Date: Mon, 02 Dec 1996 15:00:00 GMT
Server: NCSA/1.4.2
Content-type: text/html

<html>
<head>
<title>CSE477 Laboratory Assignment #1</title>
</head>

<h1>CSE477: Digital Systems Design</h1>
<h3>Steve Burns, Spring 1996 </h3>

<hr>

<h2>Lab 1</h3>
<p>
<h3>Introduction to the M68HC11EVB: Using the Evaluation Board to Debug Microcontroller Programs</h3>
<p>
<b>Distributed:  April 3 - Complete By: April 12</b>
<hr>
<p>

<H3>Objectives</H3>
When you have completed this lab, you should know how to:
<UL>
<LI>Power up your evaluation board and connect it to an NT machine,
<LI>Enter and debug simple assembly language programs using the operating
system on the evaluation board,
<LI>Download S-records generated from an assembly language program,
<LI>Use a microcontroller to output a digital signal.
</UL>  
                              
<H3>Part 1: Powering up the EVB and connecting it to the PC</H3>

You will need to supply power to the evaluation board through the power supply
connected to your protoboard.  Four lines are needed: +12, -12, +5, and GND.
The supply lines are clearly marked on the power supply name plate and the
EVB. Make sure they are connected properly before plugging in the power supply.
(If you exchange +12 and -12, or +12 and +5, or even +5 and GND, some damage
will occur to the EVB. Don't do this. You will be responsible for this
sort of damage.)
<p>
The serial line from the PC should be connected to the terminal port on the
EVB (the RS-232 connector furthest away from the red reset button.) To
communicate with the EVB, run the terminal emulation program residing at:
C:\WINNT35\system32\TERMINAL.EXE .  You will need to configure the baud rate
to be 9600 (under the Settings->Communications panel). Flow control should be
set to "None" on this panel.  Then enter the Settings->Text Transfers panel and
set the Flow Control radio button to "Line at a Time".  The "Delay Between Lines" value should be set to "1/10" of a second.
<p>
Now plug in the power supply, and press the red reset button on the EVB.
A prompt should be sent to the terminal program and displayed on the PC's
screen. It should read:
<pre>
BUFFALO 2.5 (ext) - Bit User Fast Friendly Aid to Logical Operation
</pre>
Pressing return twice should list a bunch on commands that the EVB and
BUFFALO can be asked to perform.

<H3>Part 2: BUFFALO Tutorial</H3>

Read Section 4.7 of your EVB user manual. Type in the assembly code on pages
4-27 and 4-28.  Then issue the commands lists on page 4-29. (Remember to
connect Pins 20 and 21 together on connector P1. This connects the
TxD and the RxD lines of the SCI together. The example program will not
work correctly if this connection is not made.)

<H3>Part 3: Assembly Language Program</H3>

Devise an assembly language program to turn a port bit on and off with a
cycle period of one second.  I suggest using port bit PB0. 

To get started, download the following sample program to the EVB.
It just turns on this port bit.
Then modify it for your needs.
<pre>
	ORG $C000
	LDAA #$01
	STAA $1004
</pre>
Type this program in using "notepad" and run the assembler that is located
at "T:\cse477\buffalo\as11.exe". Run the assembler using the file manager's
RUN command and the assembly program's name as its only argument.
To load the assembled file to the EVB, you need to perform a text Transfer
using the terminal emulator. First type
<pre>
LOAD T
</pre>
at the BUFFALO prompt and then pull down the Transfers->Send Text File
panel. Select the file generated by the assembler (it has the extension
.S19) and click the OK button.  Your program should now be loaded into
the EVB. Press the red reset button to restart BUFFALO. (I don't know why
you need to do this.)
<p>
To actually run these two instructions, first set a breakpoint after
the last instruction (use the BUFFALO "BR C005" command) and then
enter "G C000". You be able to observe that PB0 is set to 1. (The
other bits of port B have been cleared.)

<H3>What to Turn In</H3>
Turn in the assembly program that makes the port bit turn on and off with
a cycle period of one second.

</body>
<address>
<hr>
burns@cs.washington.edu
</address>
<p>
</html>
